﻿
using RCSoft.Core.Domain.Rooms;
using System.Data.Entity.ModelConfiguration;

namespace RCSoft.Data.Mapping.Rooms
{
    /// <summary>
    /// 
    /// </summary>
    public partial class RoomTypeMap:EntityTypeConfiguration<RoomType>
    {
        public RoomTypeMap()
        {
            this.ToTable("RoomType");
            this.HasKey(r=>r.Id);
            this.Property(r => r.Name).IsRequired().HasMaxLength(50);
            this.Property(r => r.Price).HasPrecision(18, 4);
            this.Property(r => r.HourRoomStartPrice).HasPrecision(18, 4);
            this.Property(r => r.HourRoomHourPrice).HasPrecision(18, 4);
            this.Property(r => r.RoomDeposit).HasPrecision(18, 4);
            this.Property(r => r.Description).HasMaxLength(255);
        }
    }
}
